Analysis of GLDS-17 from NASA GeneLab

This R markdown file was auto-generated by the iDEP website Using iDEP 0.91, originally by Steven

Ge SX, Son EW, Yao R: iDEP: an integrated web application for differential expression and pathway analysis of RNA-Seq data. BMC Bioinformatics 2018, 19(1):534. PMID:30567491

1. Read data

First we set up the working directory to where the files are saved.

 setwd('~/Documents/HTML_R/GLDS17')

R packages and iDEP core Functions. Users can also download the iDEP_core_functions.R file. Many R packages needs to be installed first. This may take hours. Each of these packages took years to develop.So be a patient thief. Sometimes dependencies needs to be installed manually. If you are using an older version of R, and having trouble with package installation, try un-install the current version of R, delete all folders and files (C:/Program Files/R/R-3.4.3), and reinstall from scratch.

 if(file.exists('iDEP_core_functions.R'))
    source('iDEP_core_functions.R') else 
    source('https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/iDEP_core_functions.R') 

We are using the downloaded gene expression file where gene IDs has been converted to Ensembl gene IDs. This is because the ID conversion database is too large to download. You can use your original file if your file uses Ensembl ID, or you do not want to use the pathway files available in iDEP (or it is not available).

 inputFile <- 'GLDS17_Expression.csv'
 sampleInfoFile <- 'GLDS17_Sampleinfo.csv'
 gldsMetadataFile <- 'GLDS17_Metadata.csv'
 geneInfoFile <- 'Arabidopsis_thaliana__athaliana_eg_gene_GeneInfo.csv' #Gene symbols, location etc. 
 geneSetFile <- 'Arabidopsis_thaliana__athaliana_eg_gene.db'  # pathway database in SQL; can be GMT format 
 STRING10_speciesFile <- 'https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/STRING10_species.csv' 

Parameters for reading data

 input_missingValue <- 'geneMedian' #Missing values imputation method
 input_dataFileFormat <- 1  #1- read counts, 2 FKPM/RPKM or DNA microarray
 input_minCounts <- 0.5 #Min counts
 input_NminSamples <- 1 #Minimum number of samples 
 input_countsLogStart <- 4  #Pseudo count for log CPM
 input_CountsTransform <- 1 #Methods for data transformation of counts. 1-EdgeR's logCPM 2-VST, 3-rlog 
readMetadata.out <- readMetadata(gldsMetadataFile)
library(knitr)   #  install if needed. for showing tables with kable
library(kableExtra)
kable( readMetadata.out ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
sl_FLTBA_Rep1 sl_FLTBA_Rep2 sl_FLTBA_Rep3 sl_FLTBA_Rep4 sl_FLTBA_Rep5 sl_FLTBG_Rep1 sl_GCBA_Rep1 sl_GCBA_Rep2 sl_GCBA_Rep3 sl_GCBA_Rep4 sl_GCBA_Rep5 sl_GCBG_Rep1 UdCC_FLTBB_Rep1 UdCC_FLTBB_Rep2 UdCC_FLTBB__Rep3 UdCC_FLTBB_Rep4 UdCC_FLTBG_Rep1 UdCC_FLTBG_Rep2 UdCC_GCBB_Rep1 UdCC_GCBB_Rep2 UdCC_GCBB_Rep3 UdCC_GCBB_Rep4 UdCC_GCBG_Rep1 UdCC_GCBG_Rep2
Sample.LongId Atha.Col.0.sl.FLT.BA1.Array Atha.Col.0.sl.FLT.BA2.Array Atha.Col.0.sl.FLT.BA3.Array Atha.Col.0.sl.FLT.BA4.Array Atha.Col.0.sl.FLT.BA5.Array Atha.Col.0.sl.FLT.BG1.Array Atha.Col.0.sl.GC.BA1.Array Atha.Col.0.sl.GC.BA2.Array Atha.Col.0.sl.GC.BA3.Array Atha.Col.0.sl.GC.BA4.Array Atha.Col.0.sl.GC.BA5.Array Atha.Col.0.sl.GC.BG1.Array Atha.Col.0.UdCC.FLT.BB2.Array Atha.Col.0.UdCC.FLT.BB3.Array Atha.Col.0.UdCC.FLT.BB4.Array Atha.Col.0.UdCC.FLT.BB5.Array Atha.Col.0.UdCC.FLT.BG2.Array Atha.Col.0.UdCC.FLT.BG3.Array Atha.Col.0.UdCC.GC.BB2.Array Atha.Col.0.UdCC.GC.BB3.Array Atha.Col.0.UdCC.GC.BB4.Array Atha.Col.0.UdCC.GC.BB5.Array Atha.Col.0.UdCC.GC.BG2.Array Atha.Col.0.UdCC.GC.BG3.Array
Sample.Id Atha.Col.0.sl.FLT.BA1 Atha.Col.0.sl.FLT.BA2 Atha.Col.0.sl.FLT.BA3 Atha.Col.0.sl.FLT.BA4 Atha.Col.0.sl.FLT.BA5 Atha.Col.0.sl.FLT.BG1 Atha.Col.0.sl.GC.BA1 Atha.Col.0.sl.GC.BA2 Atha.Col.0.sl.GC.BA3 Atha.Col.0.sl.GC.BA4 Atha.Col.0.sl.GC.BA5 Atha.Col.0.sl.GC.BG1 Atha.Col.0.UdCC.FLT.BB2 Atha.Col.0.UdCC.FLT.BB3 Atha.Col.0.UdCC.FLT.BB4 Atha.Col.0.UdCC.FLT.BB5 Atha.Col.0.UdCC.FLT.BG2 Atha.Col.0.UdCC.FLT.BG3 Atha.Col.0.UdCC.GC.BB2 Atha.Col.0.UdCC.GC.BB3 Atha.Col.0.UdCC.GC.BB4 Atha.Col.0.UdCC.GC.BB5 Atha.Col.0.UdCC.GC.BG2 Atha.Col.0.UdCC.GC.BG3
Sample.Name Atha_Col-0_sl_FLT_BA1 Atha_Col-0_sl_FLT_BA2 Atha_Col-0_sl_FLT_BA3 Atha_Col-0_sl_FLT_BA4 Atha_Col-0_sl_FLT_BA5 Atha_Col-0_sl_FLT_BG1 Atha_Col-0_sl_GC_BA1 Atha_Col-0_sl_GC_BA2 Atha_Col-0_sl_GC_BA3 Atha_Col-0_sl_GC_BA4 Atha_Col-0_sl_GC_BA5 Atha_Col-0_sl_GC_BG1 Atha_Col-0_UdCC_FLT_BB2 Atha_Col-0_UdCC_FLT_BB3 Atha_Col-0_UdCC_FLT_BB4 Atha_Col-0_UdCC_FLT_BB5 Atha_Col-0_UdCC_FLT_BG2 Atha_Col-0_UdCC_FLT_BG3 Atha_Col-0_UdCC_GC_BB2 Atha_Col-0_UdCC_GC_BB3 Atha_Col-0_UdCC_GC_BB4 Atha_Col-0_UdCC_GC_BB5 Atha_Col-0_UdCC_GC_BG2 Atha_Col-0_UdCC_GC_BG3
GLDS 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17
Accession GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17 GLDS-17
Hardware BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC
Tissue Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture Undifferentiated Cell Culture
Age 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days
Organism Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana
Ecotype Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0
Genotype WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT
Variety Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT
Radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth
Gravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial
Developmental 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old Seedlings 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture
Time.series.or.Concentration.gradient Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point
Light Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark
Assay..RNAseq. Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling Microarray Transcription Profiling
Temperature Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle
Treatment.type Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight
Treatment.intensity x x x x x x x x x x x x x x x x x x x x x x x x
Treament.timing x x x x x x x x x x x x x x x x x x x x x x x x
Preservation.Method. RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater RNALater
 readData.out <- readData(inputFile) 
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
   kable( head(readData.out$data) ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Atha_Col0_sl_FLT_BA1 Atha_Col0_sl_FLT_BA2 Atha_Col0_sl_FLT_BA3 Atha_Col0_sl_FLT_BA4 Atha_Col0_sl_FLT_BA5 Atha_Col0_sl_FLT_BG1 Atha_Col0_sl_GC_BA1 Atha_Col0_sl_GC_BA2 Atha_Col0_sl_GC_BA3 Atha_Col0_sl_GC_BA4 Atha_Col0_sl_GC_BA5 Atha_Col0_sl_GC_BG1 Atha_Col0_UdCC_FLT_BB2 Atha_Col0_UdCC_FLT_BB3 Atha_Col0_UdCC_FLT_BB4 Atha_Col0_UdCC_FLT_BB5 Atha_Col0_UdCC_FLT_BG2 Atha_Col0_UdCC_FLT_BG3 Atha_Col0_UdCC_GC_BB2 Atha_Col0_UdCC_GC_BB3 Atha_Col0_UdCC_GC_BB4 Atha_Col0_UdCC_GC_BB5 Atha_Col0_UdCC_GC_BG2 Atha_Col0_UdCC_GC_BG3
AT1G54410 4.000000 4.000000 4.023654 4.000000 3.948434 3.922289 3.858639 4.005313 4.031362 4.025403 4.028996 4.000000 2.620562 2.860030 2.621765 2.619961 3.256189 2.624995 2.620669 2.852740 2.620385 2.627844 2.627844 2.862258
AT3G16770 4.000000 4.000000 4.023654 4.000000 3.948434 3.922289 3.959517 4.005313 4.031362 4.025403 4.028996 4.000000 3.385387 3.237845 3.054858 3.384327 3.077866 3.236042 3.053234 3.052812 3.228488 2.862258 3.063853 3.240702
AT1G62480 3.807355 3.807355 3.829892 3.807355 3.758286 3.733441 3.750172 3.812416 3.837239 3.831558 3.727226 3.807355 2.620562 2.346749 2.621765 2.619961 2.637337 2.624995 2.853104 2.620385 2.343286 2.347810 2.627844 2.627844
AT1G09310 3.807355 3.807355 3.722288 3.807355 3.758286 3.733441 2.609122 3.705345 3.729414 3.723904 3.727226 3.700440 2.620562 2.346749 2.344122 2.852199 2.637337 2.624995 2.620669 2.620385 2.852740 2.347810 2.862258 2.627844
AT2G05520 3.807355 3.700440 3.829892 3.700440 3.758286 3.628857 3.365128 3.705345 3.612874 3.723904 3.834984 3.700440 2.620562 2.626097 2.621765 2.852199 2.874351 2.624995 2.620669 2.343286 2.620385 2.627844 2.627844 2.627844
AT3G16400 3.700440 3.700440 3.722288 3.700440 3.652906 3.628857 3.505208 3.705345 3.729414 3.723904 3.727226 3.700440 2.620562 2.346749 2.621765 3.052185 3.256189 2.346081 2.343458 2.620385 2.620385 2.627844 2.627844 2.347810
 readSampleInfo.out <- readSampleInfo(sampleInfoFile) 
 kable( readSampleInfo.out ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Gravity Tissue
Atha_Col0_sl_FLT_BA1 Microgravity Etiolated seedling
Atha_Col0_sl_FLT_BA2 Microgravity Etiolated seedling
Atha_Col0_sl_FLT_BA3 Microgravity Etiolated seedling
Atha_Col0_sl_FLT_BA4 Microgravity Etiolated seedling
Atha_Col0_sl_FLT_BA5 Microgravity Etiolated seedling
Atha_Col0_sl_FLT_BG1 Microgravity Etiolated seedling
Atha_Col0_sl_GC_BA1 Terrestrial Etiolated seedling
Atha_Col0_sl_GC_BA2 Terrestrial Etiolated seedling
Atha_Col0_sl_GC_BA3 Terrestrial Etiolated seedling
Atha_Col0_sl_GC_BA4 Terrestrial Etiolated seedling
Atha_Col0_sl_GC_BA5 Terrestrial Etiolated seedling
Atha_Col0_sl_GC_BG1 Terrestrial Etiolated seedling
Atha_Col0_UdCC_FLT_BB2 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_FLT_BB3 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_FLT_BB4 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_FLT_BB5 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_FLT_BG2 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_FLT_BG3 Microgravity Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BB2 Terrestrial Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BB3 Terrestrial Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BB4 Terrestrial Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BB5 Terrestrial Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BG2 Terrestrial Undifferentiated Cell Culture
Atha_Col0_UdCC_GC_BG3 Terrestrial Undifferentiated Cell Culture
 input_selectOrg ="NEW" 
 input_selectGO <- 'GOBP'   #Gene set category 
 input_noIDConversion = TRUE  
 allGeneInfo.out <- geneInfo(geneInfoFile) 
 converted.out = NULL 
 convertedData.out <- convertedData()    
 nGenesFilter()  
## [1] "16156 genes in 24 samples. 16156  genes passed filter.\n Original gene IDs used."
 convertedCounts.out <- convertedCounts()  # converted counts, just for compatibility 

2. Pre-process

# Read counts per library 
 parDefault = par() 
 par(mar=c(12,4,2,2)) 
 # barplot of total read counts
 x <- readData.out$rawCounts
 groups = as.factor( detectGroups(colnames(x ) ) )
 if(nlevels(groups)<=1 | nlevels(groups) >20 )  
  col1 = 'green'  else
  col1 = rainbow(nlevels(groups))[ groups ]             
         
 barplot( colSums(x)/1e6, 
        col=col1,las=3, main="Total read counts (millions)")  

 readCountsBias()  # detecting bias in sequencing depth 
## [1] 1.69578e-11
## [1] 0.587659
## [1] 6.369467e-15
## [1] "Warning! Sequencing depth bias detected. Total read counts are significantly different among sample groups (p= 1.70e-11 ) based on ANOVA.  Total read counts seem to be correlated with factor Tissue (p= 6.37e-15 ).  "
 # Box plot 
 x = readData.out$data 
 boxplot(x, las = 2, col=col1,
    ylab='Transformed expression levels',
    main='Distribution of transformed data') 

 #Density plot 
 par(parDefault) 
## Warning in par(parDefault): graphical parameter "cin" cannot be set
## Warning in par(parDefault): graphical parameter "cra" cannot be set
## Warning in par(parDefault): graphical parameter "csi" cannot be set
## Warning in par(parDefault): graphical parameter "cxy" cannot be set
## Warning in par(parDefault): graphical parameter "din" cannot be set
## Warning in par(parDefault): graphical parameter "page" cannot be set
 densityPlot()       

 # Scatter plot of the first two samples 
 plot(x[,1:2],xlab=colnames(x)[1],ylab=colnames(x)[2], 
    main='Scatter plot of first two samples') 

 ####plot gene or gene family
 input_selectOrg ="BestMatch" 
 input_geneSearch <- 'HOXA' #Gene ID for searching 
 genePlot()  
## NULL
 input_useSD <- 'FALSE' #Use standard deviation instead of standard error in error bar? 
 geneBarPlotError()       
## NULL

3. Heatmap

 # hierarchical clustering tree
 x <- readData.out$data
 maxGene <- apply(x,1,max)
 # remove bottom 25% lowly expressed genes, which inflate the PPC
 x <- x[which(maxGene > quantile(maxGene)[1] ) ,] 
 plot(as.dendrogram(hclust2( dist2(t(x)))), ylab="1 - Pearson C.C.", type = "rectangle") 

 #Correlation matrix
 input_labelPCC <- TRUE #Show correlation coefficient? 
 correlationMatrix() 

 # Parameters for heatmap
 input_nGenes <- 1000   #Top genes for heatmap
 input_geneCentering <- TRUE    #centering genes ?
 input_sampleCentering <- FALSE #Center by sample?
 input_geneNormalize <- FALSE   #Normalize by gene?
 input_sampleNormalize <- FALSE #Normalize by sample?
 input_noSampleClustering <- FALSE  #Use original sample order
 input_heatmapCutoff <- 4   #Remove outliers beyond number of SDs 
 input_distFunctions <- 1   #which distant funciton to use
 input_hclustFunctions <- 1 #Linkage type
 input_heatColors1 <- 1 #Colors
 input_selectFactorsHeatmap <- 'Gravity'    #Sample coloring factors 
 png('heatmap.png', width = 10, height = 15, units = 'in', res = 300) 
 staticHeatmap() 
 dev.off()  
## png 
##   2

[heatmap] (heatmap.png)

 heatmapPlotly() # interactive heatmap using Plotly 

4. K-means clustering

 input_nGenesKNN <- 2000    #Number of genes fro k-Means
 input_nClusters <- 4   #Number of clusters 
 maxGeneClustering = 12000
 input_kmeansNormalization <- 'geneMean'    #Normalization
 input_KmeansReRun <- 0 #Random seed 

 distributionSD()  #Distribution of standard deviations 

 KmeansNclusters()  #Number of clusters 

 Kmeans.out = Kmeans()   #Running K-means 
 KmeansHeatmap()   #Heatmap for k-Means 

 #Read gene sets for enrichment analysis 
 sqlite  <- dbDriver('SQLite')
 input_selectGO3 <- 'GOBP'  #Gene set category
 input_minSetSize <- 15 #Min gene set size
 input_maxSetSize <- 2000   #Max gene set size 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO3,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 # Alternatively, users can use their own GMT files by
 #GeneSets.out <- readGMTRobust('somefile.GMT')  
 results <- KmeansGO()  #Enrichment analysis for k-Means clusters   
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound
 input_seedTSNE <- 0    #Random seed for t-SNE
 input_colorGenes <- TRUE   #Color genes in t-SNE plot? 
 tSNEgenePlot()  #Plot genes using t-SNE 

5. PCA and beyond

 input_selectFactors <- 'Gravity'   #Factor coded by color
 input_selectFactors2 <- 'Tissue'   #Factor coded by shape
 input_tsneSeed2 <- 0   #Random seed for t-SNE 
 #PCA, MDS and t-SNE plots
 PCAplot()  

 MDSplot() 

 tSNEplot()  

 #Read gene sets for pathway analysis using PGSEA on principal components 
 input_selectGO6 <- 'GOBP' 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO6,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 PCApathway() # Run PGSEA analysis 
## Warning: Package 'KEGG.db' is deprecated and will be removed from Bioconductor
##   version 3.12

 cat( PCA2factor() )   #The correlation between PCs with factors 
## 
##  Correlation between Principal Components (PCs) with factors
## PC1 is correlated with Tissue (p=7.27e-18).

6. DEG1

 input_CountsDEGMethod <- 2 #DESeq2= 3,limma-voom=2,limma-trend=1 
 input_limmaPval <- 0.1 #FDR cutoff
 input_limmaFC <- 2 #Fold-change cutoff
 input_selectModelComprions <- 'Gravity: Microgravity vs. Terrestrial'  #Selected comparisons
 input_selectFactorsModel <- 'Gravity'  #Selected comparisons
 input_selectInteractions <- NULL   #Selected comparisons
 input_selectBlockFactorsModel <- NULL  #Selected comparisons
 factorReferenceLevels.out <- c('Gravity:Terrestrial') 

 limma.out <- limma()
## Error in lmFit(y, design, block = block, correlation = correlation, weights = weights): row dimension of design doesn't match column dimension of data object
 DEG.data.out <- DEG.data()
## Error in DEG.data(): object 'limma.out' not found
 limma.out$comparisons 
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 input_selectComparisonsVenn = limma.out$comparisons[1:3] # use first three comparisons
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 input_UpDownRegulated <- FALSE #Split up and down regulated genes 
 vennPlot() # Venn diagram 
## Error in vennPlot(): object 'limma.out' not found
  sigGeneStats() # number of DEGs as figure 
## Error in sigGeneStats(): object 'limma.out' not found
  sigGeneStatsTable() # number of DEGs as table 
## Error in sigGeneStatsTable(): object 'limma.out' not found

7. DEG2

 input_selectContrast <- 'Microgravity-Terrestrial' #Selected comparisons 
 selectedHeatmap.data.out <- selectedHeatmap.data()
## Error in selectedHeatmap.data(): object 'limma.out' not found
 selectedHeatmap()   # heatmap for DEGs in selected comparison
## Error in selectedHeatmap(): object 'selectedHeatmap.data.out' not found
 # Save gene lists and data into files
 write.csv( selectedHeatmap.data()$genes, 'heatmap.data.csv') 
## Error in selectedHeatmap.data(): object 'limma.out' not found
 write.csv(DEG.data(),'DEG.data.csv' )
## Error in DEG.data(): object 'limma.out' not found
 write(AllGeneListsGMT() ,'AllGeneListsGMT.gmt')
## Error in AllGeneListsGMT(): object 'limma.out' not found
 input_selectGO2 <- 'GOBP'  #Gene set category 
 geneListData.out <- geneListData()  
## Error in geneListData(): object 'limma.out' not found
 volcanoPlot()  
## Error in volcanoPlot(): object 'limma.out' not found
  scatterPlot()  
## Error in scatterPlot(): object 'limma.out' not found
  MAplot()  
## Error in MAplot(): object 'limma.out' not found
  geneListGOTable.out <- geneListGOTable()  
## Error in geneListGOTable(): object 'selectedHeatmap.data.out' not found
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO2,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_removeRedudantSets <- TRUE   #Remove highly redundant gene sets? 
 results <- geneListGO()  #Enrichment analysis
## Error in geneListGO(): object 'geneListGOTable.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound

STRING-db API access. We need to find the taxonomy id of your species, this used by STRING. First we try to guess the ID based on iDEP’s database. Users can also skip this step and assign NCBI taxonomy id directly by findTaxonomyID.out = 10090 # mouse 10090, human 9606 etc.

 STRING10_species = read.csv(STRING10_speciesFile)  
 ix = grep('Arabidopsis thaliana', STRING10_species$official_name ) 
 findTaxonomyID.out <- STRING10_species[ix,1] # find taxonomyID
 findTaxonomyID.out  
## [1] 3702

Enrichment analysis using STRING

  STRINGdb_geneList.out <- STRINGdb_geneList() #convert gene lists
## Error in STRINGdb_geneList(): object 'geneListData.out' not found
 input_STRINGdbGO <- 'Process'  #'Process', 'Component', 'Function', 'KEGG', 'Pfam', 'InterPro' 
 results <- stringDB_GO_enrichmentData()  # enrichment using STRING 
## Error in stringDB_GO_enrichmentData(): object 'selectedHeatmap.data.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound

PPI network retrieval and analysis

 input_nGenesPPI <- 100 #Number of top genes for PPI retrieval and analysis 
 stringDB_network1(1) #Show PPI network 
## Error in stringDB_network1(1): object 'STRINGdb_geneList.out' not found

Generating interactive PPI

 write(stringDB_network_link(), 'PPI_results.html') # write results to html file 
## Error in stringDB_network_link(): object 'STRINGdb_geneList.out' not found
 browseURL('PPI_results.html') # open in browser 

8. Pathway analysis

 input_selectContrast1 <- 'Microgravity-Terrestrial'    #select Comparison 
 #input_selectContrast1 = limma.out$comparisons[3] # manually set
 input_selectGO <- 'GOBP'   #Gene set category 
 #input_selectGO='custom' # if custom gmt file
 input_minSetSize <- 15 #Min size for gene set
 input_maxSetSize <- 2000   #Max size for gene set 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_pathwayPvalCutoff <- 0.2 #FDR cutoff
 input_nPathwayShow <- 30   #Top pathways to show
 input_absoluteFold <- FALSE    #Use absolute values of fold-change?
 input_GenePvalCutoff <- 1  #FDR to remove genes 

 input_pathwayMethod = 1  # 1  GAGE
 gagePathwayData.out <- gagePathwayData()  # pathway analysis using GAGE  
## Error in gagePathwayData(): object 'limma.out' not found
 results <- gagePathwayData.out  #Enrichment analysis for k-Means clusters  
## Error in eval(expr, envir, enclos): object 'gagePathwayData.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound
 pathwayListData.out = pathwayListData() 
## Error in pathwayListData(): object 'gagePathwayData.out' not found
 enrichmentPlot(pathwayListData.out, 25  ) 
## Error in enrichmentPlot(pathwayListData.out, 25): object 'pathwayListData.out' not found
  enrichmentNetwork(pathwayListData.out )  
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
  enrichmentNetworkPlotly(pathwayListData.out) 
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
 input_pathwayMethod = 3  # 1  fgsea 
 fgseaPathwayData.out <- fgseaPathwayData() #Pathway analysis using fgsea 
## Error in fgseaPathwayData(): object 'limma.out' not found
 results <- fgseaPathwayData.out  #Enrichment analysis for k-Means clusters 
## Error in eval(expr, envir, enclos): object 'fgseaPathwayData.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound
  pathwayListData.out = pathwayListData() 
## Error in pathwayListData(): object 'fgseaPathwayData.out' not found
 enrichmentPlot(pathwayListData.out, 25  ) 
## Error in enrichmentPlot(pathwayListData.out, 25): object 'pathwayListData.out' not found
  enrichmentNetwork(pathwayListData.out )  
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
  enrichmentNetworkPlotly(pathwayListData.out) 
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
   PGSEAplot() # pathway analysis using PGSEA 
## Error in findContrastSamples(input_selectContrast1, colnames(convertedData.out), : object 'c.out' not found

9. Chromosome

 input_selectContrast2 <- 'Microgravity-Terrestrial'    #select Comparison 
 #input_selectContrast2 = limma.out$comparisons[3] # manually set
 input_limmaPvalViz <- 0.1  #FDR to filter genes
 input_limmaFCViz <- 2  #FDR to filter genes 
 genomePlotly() # shows fold-changes on the genome 
## Error in genomePlotly(): object 'limma.out' not found

10. Biclustering

 input_nGenesBiclust <- 1000    #Top genes for biclustering
 input_biclustMethod <- 'BCCC()'    #Method: 'BCCC', 'QUBIC', 'runibic' ... 
 biclustering.out = biclustering()  # run analysis

 input_selectBicluster <- NULL  #select a cluster 
 biclustHeatmap()   # heatmap for selected cluster 
## Error in res[[i]] <- x[BicRes@RowxNumber[, number[i]], BicRes@NumberxCol[number[i], : attempt to select less than one element in integerOneIndex
 input_selectGO4 = 'GOBP'  # gene set category 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO4,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 results <- geneListBclustGO()  #Enrichment analysis for k-Means clusters   
## Error in res[[i]] <- x[BicRes@RowxNumber[, number[i]], BicRes@NumberxCol[number[i], : attempt to select less than one element in integerOneIndex
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound

11. Co-expression network

 input_mySoftPower <- 5 #SoftPower to cutoff
 input_nGenesNetwork <- 1000    #Number of top genes
 input_minModuleSize <- 20  #Module size minimum 
 wgcna.out = wgcna()   # run WGCNA  
## Warning: executing %dopar% sequentially: no parallel backend registered
##    Power SFT.R.sq   slope truncated.R.sq mean.k. median.k. max.k.
## 1      1   0.6960  3.1200          0.942   737.0     763.0    847
## 2      2   0.7220  1.6500          0.890   570.0     598.0    733
## 3      3   0.6860  1.1700          0.686   451.0     476.0    643
## 4      4   0.4880  0.7870          0.345   364.0     383.0    568
## 5      5   0.3390  0.5040          0.201   297.0     312.0    505
## 6      6   0.1270  0.2790          0.123   246.0     255.0    451
## 7      7   0.0204  0.1090          0.226   205.0     210.0    405
## 8      8   0.0119 -0.0919          0.397   172.0     174.0    365
## 9      9   0.0803 -0.2590          0.547   146.0     145.0    331
## 10    10   0.1590 -0.4250          0.622   125.0     122.0    300
## 11    12   0.3090 -0.6640          0.783    92.0      87.2    249
## 12    14   0.3990 -0.8660          0.845    69.4      63.4    209
## 13    16   0.4800 -1.0700          0.877    53.2      46.6    177
## 14    18   0.5680 -1.2000          0.915    41.4      35.0    151
## 15    20   0.6320 -1.3000          0.943    32.6      26.3    130
## TOM calculation: adjacency..
## ..will not use multithreading.
##  Fraction of slow calculations: 0.000000
## ..connectivity..
## ..matrix multiplication (system BLAS)..
## ..normalization..
## ..done.
 softPower()  # soft power curve 

  modulePlot()  # plot modules  

  listWGCNA.Modules.out = listWGCNA.Modules() #modules
 input_selectGO5 = 'GOBP'  # gene set category 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO5,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_selectWGCNA.Module <- NULL   #Select a module
 input_topGenesNetwork <- 10    #SoftPower to cutoff
 input_edgeThreshold <- 0.4 #Number of top genes 
 moduleNetwork()    # show network of top genes in selected module
## Error in strsplit(input_selectWGCNA.Module, " "): non-character argument
 input_removeRedudantSets <- TRUE   #Remove redundant gene sets 
 results <- networkModuleGO()  #Enrichment analysis of selected module
## Error in strsplit(input_selectWGCNA.Module, " "): non-character argument
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 5.82e-35 31 Cellular response to decreased oxygen levels
5.82e-35 31 Cellular response to oxygen levels
5.82e-35 31 Cellular response to hypoxia
1.80e-33 31 Response to hypoxia
2.32e-33 31 Response to decreased oxygen levels
2.32e-33 31 Response to oxygen levels
7.15e-26 57 Response to abiotic stimulus
1.37e-24 44 Cellular response to stress
1.66e-23 24 Response to heat
1.31e-22 46 Cellular response to chemical stimulus
B 2.64e-57 106 Translation
2.64e-57 106 Peptide biosynthetic process
3.33e-57 110 Amide biosynthetic process
1.40e-55 108 Peptide metabolic process
5.84e-55 115 Cellular amide metabolic process
8.48e-49 144 Organonitrogen compound biosynthetic process
4.79e-30 54 Response to cadmium ion
9.14e-29 60 Response to metal ion
2.54e-25 78 Response to inorganic substance
7.19e-22 116 Response to abiotic stimulus
C 1.26e-18 80 Response to abiotic stimulus
6.79e-16 65 Response to hormone
1.07e-15 65 Response to endogenous stimulus
6.82e-14 68 Response to organic substance
4.03e-13 44 Response to inorganic substance
3.96e-11 55 Response to oxygen-containing compound
7.13e-11 46 Response to acid chemical
2.38e-10 28 Response to metal ion
3.71e-10 43 Defense response
9.28e-10 10 Water transport
D 4.66e-19 113 Response to organic substance
4.66e-19 73 Response to inorganic substance
4.51e-18 104 Small molecule metabolic process
2.46e-17 97 Response to hormone
3.91e-17 113 Response to abiotic stimulus
5.29e-17 97 Response to endogenous stimulus
1.19e-16 78 Oxoacid metabolic process
1.29e-16 98 Organonitrogen compound biosynthetic process
1.56e-16 78 Organic acid metabolic process
3.44e-15 90 Response to oxygen-containing compound